Conversation
| #pragma warning disable IL2046 // RequiresUnreferencedCode attribute mismatch | ||
| #pragma warning disable IL3051 // RequiresDynamicCode attribute mismatch | ||
| #pragma warning disable IL2072 // DynamicallyAccessedMembers warning | ||
| public class FsCheckPropertyTestExecutor : ITestExecutor |
There was a problem hiding this comment.
This is pretty cool - I was wondering if someone could give property based testing a go.
Did you give creating a custom data attribute a go at all? Wondering what that'd look like too. Might just fill up the IDE a lot.
SummaryAdds TUnit.FsCheck library with property-based testing support, extending the test discovery to support custom test attributes inheriting from BaseTestAttribute. Critical Issues1. AOT Compatibility - Missing [DynamicallyAccessedMembers] Annotations
|
SummaryThis PR adds a new TUnit.FsCheck library that provides property-based testing support using FsCheck, allowing tests to be run with automatically generated input values. Critical Issues1. AOT Compatibility - Missing
|
|
I realise that I made this way more complicated that it needed to be 😅 should be a bit simpler now |
SummaryAdds TUnit.FsCheck library for property-based testing integration with FsCheck. Critical Issues1. AOT Compatibility Violation - Missing Proper Annotations
|
SummaryAdds TUnit.FsCheck library for property-based testing using FsCheck, extending TUnit with a new optional package. Critical IssuesNone found ✅ ObservationsAOT Compatibility - Properly DocumentedThe code correctly uses TUnit Rules Compliance
DesignThis PR demonstrates good use of TUnit's extensibility model:
Previous Review CommentsThe github-actions bot raised concerns about AOT annotations, but these appear to have been addressed in the current code with proper Verdict✅ APPROVE - Well-designed extension library that properly uses TUnit's extensibility model. AOT limitations are acceptable and clearly documented for an optional property-based testing add-on. |
|
Thanks Stu. If you add this new project in |

Description
I've had a go at adding
TUnit.FsCheck, with some tweaks to the core to better support this extensibility.I'm opening as a draft for visibility, but will properly fill out the checklist below when it's ready.
Related Issue
Fixes #
Type of Change
Checklist
Required
TUnit-Specific Requirements
TUnit.Core.SourceGenerator)TUnit.Engine)TUnit.Core.SourceGenerator.Testsand/orTUnit.PublicAPItests.received.txtfiles and accepted them as.verified.txt.verified.txtfiles[DynamicallyAccessedMembers]annotationsdotnet publish -p:PublishAot=trueTesting
dotnet test)Additional Notes